function DeleteCardLayer(bankcard_id) {
    this.bankcard_id = bankcard_id;
    this.init();
}
DeleteCardLayer.prototype.init = function() {
	var me = this;
	var template = __inline("./DeleteCardLayer.tmpl");
    var content = template({});
    $(document.body).append(content);
};
DeleteCardLayer.prototype.show = function() {
    var me = this;
	$('#deleteCard').modalBox({
        keyClose:false,
        bodyClose:false
    });
    me.eventCenter();
}
DeleteCardLayer.prototype.setProperty = function(bankcard_id) {
    this.bankcard_id = bankcard_id;
}
DeleteCardLayer.prototype.eventCenter = function() {
    var me = this;
    $('#delete_commit').bind('click',function () {
        $.post('/bank/delbankcard',{'bankcard_id':me.bankcard_id}, function(data) {
            if(data&& data.error_no == 0) {
                location.reload();
            } else {
                alert(data.error_message);
            }
        },'json');
    });
    $('#delete_cancel').bind('click',function () {
        $('#deleteCard').modalBox('close');
    });
}
module.exports = DeleteCardLayer;